#pragma once
#include <iostream>
using namespace std;
#include "DataStruct.h"
/*!
 * \class CBasisFunction
 *
 * \brief Basis function class
 *
 * \author wanyzh
 * \date Jan 2021
 */
class CBasisFunction
{
public:

	CBasisFunction(BASIS_TYPE type=TWO_DIM_LINEAR);
	
public:
	double FE_basis_local_func_2D(const CPoint &x, const vector<CPoint> &vertices,const BASIS_TYPE &basis_type, const int &basis_index, const int &basis_der_x, const int &basis_der_y)const;
	double FE_reference_basis_func_2D(const CPoint &xh, const BASIS_TYPE &basis_type, const int &basis_index, const int &basis_der_x, const int &basis_der_y) const;
	BASIS_TYPE &getType() { return m_dType; }
	void setType(BASIS_TYPE type) { m_dType = type; }
	int getNumberBasis();

private:
	//type of the basis function
	BASIS_TYPE m_dType;

	map<BASIS_TYPE, ELE_TYPE>BASIS_ELE;
};

